<template>
  <div id="app" class="main-app">
    <div class="left-menu">
      <router-link to="/">base</router-link>
      <!-- 子应用 vue app -->
      <router-link to="/app-vue-hash">vue app</router-link>
      <!-- 子应用 pure html -->
      <router-link to="/pureHtml">pureHtml</router-link>
      <!-- 主应用 vue app -->
      <router-link to="/login">login</router-link>
      <router-link to="/register">register</router-link>
    </div>

    <div class="app-body">
      <keep-alive>
        <router-view />
      </keep-alive>
      <div id="loading"></div>
    </div>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
.main-app {
  display: flex;
  flex-direction: row;
  padding: 0 10px;
}
.left-menu {
  display: flex;
  flex-direction: column;
}
.app-body {
  flex: 1;
}

#loading {
  display: flex;
  justify-content: center;
  align-items: center;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: red;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
